import sys
from PyQt5.QtWidgets import QApplication, QWidget, QVBoxLayout, QHBoxLayout, QFormLayout
from PyQt5.QtWidgets import QPushButton, QLineEdit, QTextEdit


if __name__ == "__main__":
    # 1. 创建应用程序
    app = QApplication(sys.argv)

    # 2. 创建窗口
    w = QWidget()
    # 创建标题
    w.setWindowTitle("KZZ-260上位机")
    # w.resize(400, 300)

    # 创建垂直布局：vertical；创建水平布局：horizon
    root_layout = QHBoxLayout(w)

    # column1
    column1 = QVBoxLayout()
    column1.addWidget(QPushButton("1"))

    # column2
    column2 = QVBoxLayout()
    column2.addWidget(QPushButton("2"))
    column2.addWidget(QPushButton("3"))

    # column3
    column3 = QVBoxLayout()
    column3.addWidget(QPushButton("4"))
    column3.addWidget(QPushButton("5"))
    column3.addWidget(QPushButton("6"))

    root_layout.addLayout(column1)
    root_layout.addLayout(column2)
    root_layout.addLayout(column3)
    # 3. 显示窗口
    w.show()

    # 4. 等待APP停止
    sys.exit(app.exec_())
